/**
 * @(#) CongMoneyMediator.as
 *
 * @date		2009. 03. 25.
 * @version		1.0
 * @author		baek, kwang hyoun
 * @description	건강보험증 신청 - Mediator
 * 				건강보험증을 조회하고 신청하는 Presentation Logic을 관리
 */
package com.skt.common_hr.ethics.view
{
	import com.skt.common_hr.common.puremvc.OverViewMediator;
	import com.skt.common_hr.ethics.view.components.EthicsOverView;
	import com.wcl.utils.DateUtil;

	public class EthicsMediator extends OverViewMediator
	{
		public static const NAME:String = "bankreqMediator";


		/**
		* 생성자
		*
		* @param
		* @return void
		*/
        public function EthicsMediator( viewComponent:Object )
        {
            super( NAME, viewComponent );
        }

		/**
		* View를 초기화 한다.
		*	- View에 기본사항을 출력하고 data를 load
		* @param
		* @return void
		* 최초 한번만 불림
		*/
 		override protected function initializeView():void
 		{
			super.initializeView();
			
 		}
		/***
		 * 활성화가 될때마다 불림.
		 */
		override protected function activatedView():void
		{
			super.activatedView();
			setDateRange();
			loadList();
		}
		
		public function loadList():void
 		{
 			view.initView();
 		}
 		
 		private function setDateRange():void
 		{
 			var date:Date= DateUtil.todayNoTime();
 			date.fullYear -= 2;
 			view.BEGDA = new Date(date);
 			date.fullYear += 2;
 			view.ENDDA = new Date();
 		}

        private function get view():EthicsOverView
        {
            return viewComponent as EthicsOverView;
        }


	}
}